/**
 *  @file Base64.h
 */
#ifndef _BASE64_H_
#define _BASE64_H_

#include "../common/commontypes.h"

namespace cppflib
{

namespace convert
{

/**
 *  Functions to encode and decode data in Base64 format.
 */
namespace base64
{

_DLLAPI u32_t GetEncodeBufferNeed(const u32_t srcLen);
_DLLAPI u32_t GetDecodeBufferNeed(const u8_t * srcBuf, const u32_t srcLen);
_DLLAPI void Encode(const int numByte, const int b1, const int b2, const int b3, u8_t out[4]);
_DLLAPI void Decode(const int b1, const int b2, const int b3, const int b4, u8_t out[3], int * numDecoded);
_DLLAPI bool Encode(const u8_t * srcBuf, const int srcLen, u8_t ** outBuf, int * outLen);
_DLLAPI bool Decode(const u8_t * srcBuf, const int srcLen, u8_t ** outBuf, int * outLen);


} // end of base64

} // end of convert

} // end of cppflib


#endif
